home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1992 June / 1992-06.d64 / file logger (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  98 lines

  1. 5 rem copyright 1992 - compute publications intl ltd - all rights reserved
  2. 10 ifpeek(830)=1then720
  3. 15 ifpeek(27296)<>169thenload"log.ml",8,1
  4. 17 poke808,225:poke146,0
  5. 20 poke53281,6:poke53280,6:clr:dimf$(100):tp$(0)="xxx":tp$(2)="prg":tp$(1)="seq"
  6. 30 tp$(3)="usr":tp$(4)="rel"
  7. 40 h$="0123456789abcdef"
  8. 50 printchr$(142);"[147][144] (c) 1992 compute publications intl ltd"
  9. 51 print"           all rights reserved"
  10. 55 print"          f i l e  l o g g e r"
  11. 60 print"   [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  12. 80 print"                            "
  13. 90 print" 1 -- [158]log disk"
  14. 100 print" 2 -- [158]exit to basic"
  15. 120 print"please select (1 - 2):";:poke204,0
  16. 130 geta$
  17. 140 ifa$="1"then180
  18. 150 ifa$="2"thenpoke204,1:printa$:end
  19. 170 goto130
  20. 180 print"[147] send output to printer (y/n):";:poke204,0
  21. 190 geta$
  22. 200 ifa$="y"thenpoke204,1:printa$:z=4:goto230
  23. 210 ifa$="n"thenpoke204,1:printa$:z=3:goto230
  24. 220 goto190
  25. 230 print"[147]looking at directory...";:bm$="":open15,8,15,"i":open3,8,3,"$"
  26. 240 close4:open4,z:dn=z-3:tb=10*dn
  27. 250 forx=1to142:get#3,a$:next:print".";
  28. 260 forx=1to16:get#3,b$:bm$=bm$+b$:next:print".";
  29. 270 get#3,a$,a$:get#3,i1$,i2$
  30. 275 ifz=4thenprint#4,chr$(13);chr$(13)
  31. 280 print"[147]";:print#4,tab(tb);"        bam title             id"
  32. 290 ifz=3thenprint"        [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  33. 295 ifz=4thenprint#4,tab(tb);"        ------------------------"
  34. 300 id$=i1$+i2$:print"";:print#4,tab(tb);"        ";:print#4,bm$;"      ";id$
  35. 305 ifz=4thenprint#4,chr$(13);chr$(13)
  36. 310 print"";:print#4,tab(tb);"   trk sec blks    filename     type"
  37. 320 ifz=3thenprint"   [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  38. 325 ifz=4thenprint#4,tab(tb);"   ---------------------------------"
  39. 330 forj=1to92:get#3,a$:nextj
  40. 340 m=m+1:get#3,k$,t$,s$:ifs$=""thens$=chr$(0)
  41. 350 f$="":forj=1to16:get#3,a$:f$=f$+a$:nextj
  42. 360 forj=1to10:get#3,a$:nextj
  43. 370 l=0:ifa$<>""thenl=asc(a$)
  44. 380 print#4,tab(tb);"   ";:print"";
  45. 390 l$=right$(str$(l),2):ifleft$(l$,1)=" "thenl$=" "+right$(l$,1)
  46. 400 ifasc(t$+chr$(0))=0thenifl=0then560
  47. 410 t$=right$(str$(asc(t$)),2):ifleft$(t$,1)=" "thent$="0"+right$(t$,1)
  48. 420 s$=right$(str$(asc(s$)),2):ifleft$(s$,1)=" "thens$="0"+right$(s$,1)
  49. 430 k=asc(k$+chr$(0))-128
  50. 440 ifk<1ork>5thenk=0
  51. 450 print#4,t$;"  ";:print"";
  52. 460 print#4,s$;"  ";:print"";
  53. 470 print#4,l$;"   ";:print"";
  54. 480 k$=tp$(k):print#4,f$;" ";:print"";
  55. 490 ifk=0thenprint"";
  56. 500 print#4,k$:ifk<>2then520
  57. 510 f$(q)=f$:q=q+1
  58. 520 get#3,a$:ifm<8thenget#3,a$,a$:goto540
  59. 530 m=0
  60. 540 ifst=0then340
  61. 550 close3
  62. 560 print:print"[158] display start [158]& end [158]addresses (y[158]/n[158]):";:poke204,0
  63. 570 geta$
  64. 580 ifa$="y"thenpoke204,1:printa$:goto610
  65. 590 ifa$="n"thenpoke204,1:printa$:poke830,0:gosub900:run
  66. 600 goto570
  67. 610 sys27296
  68. 620 print#4,chr$(13);chr$(13):print"[147]"
  69. 630 close3:x=-1
  70. 640 print"";:print#4,tab(tb);"     filename         start   end"
  71. 645 ifz=4thenprint#4,tab(tb);"     -----------------------------"
  72. 650 ifz=3thenprint"     [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  73. 660 x=x+1:iff$(x)=""thenpoke830,0:gosub900:run
  74. 670 print"";:print#4,tab(tb);"     ";f$(x);" ";
  75. 680 forv=16to1step-1:p$=mid$(f$(x),v,1)
  76. 690 ifp$=chr$(160)thennextv
  77. 700 f$=left$(f$(x),v)
  78. 710 poke830,1:loadf$,8,1
  79. 720 a=peek(828):b=peek(829)
  80. 730 print"";:gosub780
  81. 740 print#4,"  ";
  82. 750 a=peek(175):b=peek(174)
  83. 760 print"";:gosub780
  84. 770 print#4:goto660
  85. 780 print#4,"$";:w=a:gosub790:w=b:gosub790:return
  86. 790 j=int(w/16):i=w-j*16
  87. 800 a$=mid$(h$,j+1,1):b$=mid$(h$,i+1,1)
  88. 810 print#4,a$;b$;:return
  89. 900 print:print
  90. 905 print"       press any key to continue"
  91. 910 forde=1to100:geta$:ifa$<>""then950
  92. 920 next
  93. 930 print"       press any key to continue"
  94. 940 forde=1to100:geta$:ifa$<>""then950
  95. 945 next
  96. 946 goto905
  97. 950 return
  98.